import { request } from '@ruifox-cms/utils'
//保存章节笔记
export function saveNote(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/save',
    method: 'post',
    data
  })
}
//前台分页
export function userPagingNote(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/userPaging',
    method: 'post',
    data
  })
}
//后台分页
export function pagingNote(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/paging',
    method: 'post',
    data
  })
}
//删除章节笔记
export function deleteNote(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/delete',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求头
    },
    data
  })
}
//根据课程获取章节笔记
export function getChapterNoteInCourseNote(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/getChapterNoteInCourse',
    method: 'get',
    params
  })
}
//根据课程实例获取章节笔记
export function getChapterNoteInCourseInstanceNote(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/getChapterNoteInCourseInstance',
    method: 'get',
    params
  })
}
//根据实例和章节获取章节笔记
export function getChapterNoteInCourseInstanceChapterNote(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/getChapterNoteInCourseInstanceChapter',
    method: 'get',
    params
  })
}
//根据id 获取章节笔记
export function getByIdNote(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/getById',
    method: 'get',
    params
  })
}
//存在章节笔记的课程分页
export function coursesWithNotesPagingNote(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/note/coursesWithNotesPaging',
    method: 'post',
    data
  })
}
//用户学习统计(课程实例维度)
export function userLearningStatisticsProgress(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/course/progress/userLearningStatistics',
    method: 'get',
    params
  })
}